<cfcomponent>

	<cffunction name="eventTitleTip" output="false" access="public" returntype="any" hint="I create a formatted event ToolTip Title">
		<cfargument name="startDate" type="date" required="true"/>
		<cfargument name="endDate" type="date" required="true"/>
		<cfargument name="title" type="string" required="true"/>
		<cfargument name="length" type="string" required="true"/>
		
		<cfset var tooltipHeader = left(arguments.title, arguments.length) />
		
		<cfif len(trim(arguments.title)) gt arguments.length>
			<cfset tooltipHeader = tooltipHeader & "..." & "|" & dateFormat(arguments.startDate,  "m/d") />
		<cfelse>
			<cfset tooltipHeader = tooltipHeader & "|" & dateFormat(arguments.startDate,  "m/d") />
		</cfif>
			
		<!--- if the start time exists then add the tooltip description --->
		<cfif TimeFormat(arguments.startDate) NEQ  "12:00 AM"> 
			<cfset tooltipHeader = tooltipHeader & "&nbsp;&nbsp;" & timeFormat(arguments.startDate, 'h:mm tt') />
		</cfif>
		
		<!--- if the end date exists then add to the tooltip description --->
		<cfif arguments.startDate neq arguments.endDate>
			<cfset tooltipHeader = tooltipHeader & "&nbsp;&nbsp;-&nbsp;&nbsp;" & dateFormat(arguments.endDate, "m/d") />
		</cfif>
		
		<!--- if the end time exists then add to the tooltip description --->
		<cfif TimeFormat(arguments.EndDate) NEQ  "12:00 AM"> 
			<cfset tooltipHeader = tooltipHeader & "&nbsp;&nbsp;" & timeFormat(arguments.endDate, 'h:mm tt') />
		</cfif>
		
		<cfreturn tooltipHeader />
	</cffunction>
	

	<cffunction name="eventBodyTip" output="false" access="public" returntype="any" hint="I create a formatted event ToolTip Body">
		<cfargument name="teaser" type="string" required="true"/>
		<cfargument name="description" type="string" required="true"/>
		<cfargument name="length" type="string" required="true"/>
		
		<cfset var tooltipBody = "" />
		
		<cfif len(trim(arguments.teaser))>
			<cfset tooltipBody = left(arguments.teaser, arguments.length) />
			<cfif len(trim(arguments.teaser)) gt arguments.length>
				<cfset tooltipBody = tooltipBody & " ..." />
			</cfif>
		<cfelse>
			<cfset tooltipBody = left(arguments.description, arguments.length) />
			<cfif Len(arguments.description) gt arguments.length>
				<cfset tooltipBody = tooltipBody & " ..." />
			</cfif>
		</cfif>
		
		<cfreturn tooltipBody />
	</cffunction>

</cfcomponent>